package com.physics.mps.module.compute;

import com.baomidou.mybatisplus.extension.service.IService;
import com.physics.mps.entity.dto.TaskComputeResultEntity;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author mcsoft
 */
public interface TaskComputeResultService extends IService<TaskComputeResultEntity> {

    /**
     * 获取结果图片
     *
     * @param id
     * @return
     * @throws IOException
     */
    byte[] getResultPic(String id) throws IOException;

    /**
     * 下载odb
     *
     * @param response
     * @param id
     */
    void downloadFolder(HttpServletResponse response, String id);

    /**
     * 下载odb
     * @param response
     * @param id
     * @param path
     */
    void downloadFolder(HttpServletResponse response, String id, String path);

    /**
     * 获取错误任务的结果信息
     *
     * @param id 任务ID
     * @return 错误的结果信息
     */
    String getErrorTaskResult(String id);
}
